<?php
/**
 * Author: Administrator
 * Date: 2022/7/15 2:23
 */

namespace DesignPatterns\Creation\Builder;


use DesignPatterns\Creation\Builder\Parts\Bike;
use DesignPatterns\Creation\Builder\Parts\Vehicle;
use DesignPatterns\Creation\Builder\Parts\Wheel;

class BikeBuilder implements BuilderInterface
{
    /**
     * @var Vehicle
     */
    protected $bike;

    public function createVehicle()
    {
        $this->bike = new Bike();
    }

    public function addDoor()
    {

    }

    public function addEngine()
    {

    }

    public function addWheel()
    {
        $this->bike->addParts('WheelFront', new Wheel());
        $this->bike->addParts('WheelRear', new Wheel());
    }

    public function getVehicle()
    {
        return $this->bike;
    }
}